home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Developer Utilities / Installer 4.0GM SDK / Script Examples / PowerPC⁄68K App Install / Install Fat App.r < prev    next >
Encoding:
Text File  |  1994-02-10  |  19.4 KB  |  902 lines  |  [TEXT/MPS ]

  1. /************************** 
  2.  
  3.  
  4. In order to set the Finder flags correctly the logic follows:
  5.  
  6. Package 68K-clean        -  has only the 68K Macintosh CODE resoures (infa-rsrcFork)  {deletes previous resource fork}
  7. Package 68K-update        -  has only the 68K Macintosh CODE resoures (inrm)  {no flags get set}
  8. Package PPC-clean        -  has the data fork and the cfig & NotPPC resouces  (infa-dataFork & inra for resources)
  9. Package PPC-update        -  has the data fork and the cfig & NotPPC resouce  (infa-dataFork & inrm for resources)
  10. Package Common-clean    -  Has the common resources.  (infa-rsrcFork)  {to set Finder flags}
  11. Package Common-update    -  Has the common resources.  (inrm)  {no flags get set}
  12.  
  13.  
  14. For an install where the app doesn't already exist  (need to set the Finder flags in all case via infa)
  15.  
  16. 68K Macintosh version only        (Finder flags get set with the infa common resources)
  17. Package 68K-clean                (inpk; 102)
  18. Package Common                    (inpk; 201)
  19.  
  20. PPC version only                (Finder flags get set with the infa common resources)
  21. Package PPC-clean                (infa; 203)    & (inrm; 303)
  22. Package Common                    (infa; 201)
  23.  
  24. Fat version                        (Finder flags get set with the infa common resources)
  25. Package 68K-clean                (inpk; 102)
  26. Package PPC-clean                (infa; 203)    & (inrm; 303)
  27. Package Common                    (infa; 201)
  28.  
  29.  
  30.  
  31. For an install where the app already exist  (cannot disturb previous resources- so all resources need to be added via inrm)
  32.  
  33. 68K Macintosh version only        (Other previous resources are not deleted; eg cfrg)
  34. Package 68K-updaten                (inpk; 102)
  35. Package Common                    (inpk; 201)
  36.  
  37. PPC version only                (Other previous resources are not deleted; eg CODE 0)
  38. Package PPC-update                (inpk; 203)    & (inpk; 103)
  39. Package Common                    (inpk; 301)
  40.  
  41. Fat version                        (The final CODE 0 will be for the 68K code, instead of the alert for the NotPPC)
  42. Package 68K-update                (inpk; 102)
  43. Package PPC-update                (inpk; 203)    & (inpk; 103)
  44. Package Common                    (inpk; 301)
  45.  
  46.  
  47.  
  48.  
  49. Custom Install Package List:
  50.  
  51. Place Demo Application for Any Macintosh
  52.     Place Demo Application for 68K Macintosh
  53.     Place Demo Application for PowerPC Macintosh
  54.  
  55. Update Demo Application for Any Macintosh
  56.     Update Demo Application for 68K Macintosh
  57.     Update Demo Application for PowerPC Macintosh
  58.  
  59. **********************************/
  60. include "CheckIfInternalUserFunc";
  61.  
  62. #include "InstallerTypes.r"
  63.  
  64.  
  65. #define currentReleaseDate        -1470076096        
  66. #define currentVersion            0x01008000
  67.  
  68.  
  69. /************************** Easy Install Rule resources **********************************/
  70. #define kCheckIfInternalDriveUFID    143
  71. #define gestaltSystemType            'sysa'         /* processor type */
  72. #define gestalt68Ksysa                1
  73. #define gestaltPPCsysa                2
  74. #define kUpdatingTargetFile            701
  75. #define kUpdating68Kpart            702
  76. #define kUpdatingPowerPCpart        703
  77.  
  78. /*
  79. if targetRsrcForkExist then set assertion kUpdatingTargetFile
  80. */
  81. resource 'infr' (kGlobalFrameworkRsrcID) {
  82.     format0  {{
  83.         pickAll,    { 701 },
  84.     }};
  85. };
  86.  
  87. resource 'inrl' (701, "Check If updating target file") {
  88.     format0 {{
  89.         CheckFileRsrcForkExists { 10000 },
  90.         AddAssertion {{ kUpdatingTargetFile }}
  91.     }};
  92. };
  93.  
  94.  
  95. /*
  96. if kUpdatingTargetFile & (CODE 2 exist)                                {801}
  97.     set assertion kUpdating68Kpart
  98. else if kUpdatingTargetFile & (cfrg 0 exist)                        {802}
  99.     set assertion kUpdatingPowerPCpart
  100.  
  101. if kUpdating68Kpart & kUpdatingPowerPCpart                                    {811}
  102.     addPackage for update both 68K & PowerPC
  103. else if kUpdating68Kpart & NOT kUpdatingPowerPCpart                            {812}
  104.     addPackage for update 68K only
  105. else if NOT kUpdating68Kpart & kUpdatingPowerPCpart                            {813}
  106.     addPackage for update PowerPC only
  107. else if kUpdatingTargetFile & targetInternalVolume & gestaltPPCsysa            {814}
  108.     addPackage for update PowerPC only
  109. else if kUpdatingTargetFile & targetInternalVolume                            {815}
  110.     addPackage for update 68K only
  111. else
  112.     addPackage for FAT app                                                    {816}
  113. */
  114. resource 'infr' (kEasyInstallFrameworkRsrcID) {
  115.     format0  {{
  116.         pickAll,    { 801, 802 },                // update which parts
  117.         pickFirst,    { 811, 812, 813, 821, 822, 823 },
  118.         }};
  119.     };
  120.  
  121. resource 'inrl' (801, "Check If updating 68K part") {
  122.     format0 {{
  123.         CheckAllAssertions {{ kUpdatingTargetFile }},
  124.         CheckFileContainsRsrcByID { 10000, 'CODE', 2 },
  125.         AddAssertion {{ kUpdating68Kpart }}
  126.         }};
  127.     };
  128.  
  129. resource 'inrl' (802, "Check If updating PowerPC Macintosh part") {
  130.     format0 {{
  131.         CheckAllAssertions {{ kUpdatingTargetFile }},
  132.         CheckFileContainsRsrcByID { 10000, 'cfrg', 0 },
  133.         AddAssertion {{ kUpdatingPowerPCpart }}
  134.         }};
  135.     };
  136.  
  137. resource 'inrl' (811, "Check If updating FAT") {
  138.     format0 {{
  139.         CheckAllAssertions {{ kUpdating68Kpart, kUpdatingPowerPCpart }},
  140.         addUserDescription {"Click Install button to update\n"},
  141.         addUserDescription {"  • Demo Application for Any Macintosh\n"},
  142.         addPackages {{30011}}
  143.         }};
  144.     };
  145.  
  146. resource 'inrl' (812, "Check If updating 68K part only") {
  147.     format0 {{
  148.         CheckAllAssertions {{ kUpdating68Kpart }},
  149.         CheckAllNonAssertions {{ kUpdatingPowerPCpart }},
  150.         addUserDescription {"Click Install button to update\n"},
  151.         addUserDescription {"  • Demo Application for 68K Macintosh\n"},
  152.         addPackages {{30012}}
  153.         }};
  154.     };
  155.  
  156. resource 'inrl' (813, "Check If updating PowerPC Macintosh part only") {
  157.     format0 {{
  158.         CheckAllAssertions {{ kUpdatingPowerPCpart }},
  159.         CheckAllNonAssertions {{ kUpdating68Kpart }},
  160.         addUserDescription {"Click Install button to update\n"},
  161.         addUserDescription {"  • Demo Application for PowerPC Macintosh\n"},
  162.         addPackages {{30013}}
  163.         }};
  164.     };
  165.  
  166. resource 'inrl' (821, "Check If new PowerPC Macintosh Only") {
  167.     format0 {{
  168.         CheckAllNonAssertions {{ kUpdatingTargetFile }},
  169.         checkUserFunction {UserFunctionType, kCheckIfInternalDriveUFID, 0},
  170.         checkGestalt {gestaltSystemType, { gestaltPPCsysa } },
  171.         addUserDescription {"Click Install button to place\n"},
  172.         addUserDescription {"  • Demo Application for your PowerPC Macintosh\n"},
  173.         addPackages {{30003}}
  174.         }};
  175.     };
  176.  
  177. resource 'inrl' (822, "Check If new 68K Only") {
  178.     format0 {{
  179.         checkUserFunction {UserFunctionType, kCheckIfInternalDriveUFID, 0},
  180.         addUserDescription {"Click Install button to place\n"},
  181.         addUserDescription {"  • Demo Application for your 68K Macintosh\n"},
  182.         addPackages {{30002}}
  183.         }};
  184.     };
  185.  
  186. resource 'inrl' (823, "Otherwise handle as Fat App") {
  187.     format0 {{
  188.         addUserDescription {"Click Install button to place\n"},
  189.         addUserDescription {"  • Demo Application for Any Macintosh\n"},
  190.         addPackages {{30001}}
  191.         }};
  192.     };
  193.  
  194.  
  195. /************************** Custom Install Rule resources **********************************/
  196.  
  197. /*
  198. if kUpdatingTargetFile                    {901}
  199.     addCustomPackage kUpdating
  200. else
  201.     addCustomPackage kNotUpdating        {902}
  202. */
  203. resource 'infr' (kCustomInstallFrameworkRsrcID) {
  204.     format0  {{
  205.         pickFirst,    {901, 902},
  206.     }};
  207. };
  208.  
  209. resource 'inrl' (901, "Add Custom Items for update") {
  210.     format0 {{
  211.         CheckAllAssertions {{kUpdatingTargetFile}},
  212.         addCustomItems {{30011}}
  213.         }};
  214.     };
  215.  
  216. resource 'inrl' (902, "Add Custom Items for scratch copy") {
  217.     format0 {{
  218.         addCustomItems {{30001}}
  219.         }};
  220.     };
  221.  
  222.  
  223.  
  224. /************************** Packages resources **********************************/
  225.  
  226. /* Package to delete demo app. */
  227. resource 'inpk' (200) {
  228.     format0 {
  229.         doesntShowOnCustom, removable, dontForceRestart,
  230.         0, 0, "Package to delete the demo app",
  231.             {    
  232.             'infa', 200,        //  Delete entire file on removal
  233.             }
  234.         }
  235.     };
  236.  
  237. /* Sub-Package to copy the common resource fork. */
  238. resource 'inpk' (201) {
  239.     format0 {
  240.         doesntShowOnCustom, notRemovable, dontForceRestart,
  241.         0, 0, "Sub-Package to copy the common resource fork",
  242.             {    
  243.             'infa', 201,        //  Install Common Resource fork
  244.             }
  245.         }
  246.     };
  247.  
  248. /* Sub-Package to copy PowerPC Macintosh Data Fork. */
  249. resource 'inpk' (203) {
  250.     format0 {
  251.         doesntShowOnCustom, notRemovable, dontForceRestart,
  252.         0, 0, "Sub-Package to copy PowerPC Macintosh Data Fork",
  253.             {    
  254.             'infa', 203,        //  Install PowerPC Macintosh data fork
  255.             }
  256.         }
  257.     };
  258.  
  259. /* Sub-Package to copy Common Resources. */
  260. resource 'inpk' (301) {
  261.     format0 {
  262.         doesntShowOnCustom, notRemovable, dontForceRestart,
  263.         0, 0, "Sub-Package to copy Common Resources",
  264.             {    
  265.             'inrm', 301,        //  Install Common Resources
  266.             }
  267.         }
  268.     };
  269.  
  270.  
  271. /* Package to PLACE Demo App as fat app.*/
  272. resource 'inpk' (30001) {
  273.     format0 {
  274.         showsOnCustom, removable, dontForceRestart,
  275.         30001, 0, "Place Demo Application for Any Macintosh",
  276.             {
  277.             'inpk', 30002,        //  Package 68K part (no update)
  278.             'inpk', 30003,        //  Package PowerPC Macintosh part
  279.             'inpk', 200,        //  Delete entire file on removal
  280.             }
  281.         }
  282.     };
  283.  
  284. /* Package to UPDATE Demo App as fat app. (update)*/
  285. resource 'inpk' (30011) {
  286.     format0 {
  287.         showsOnCustom, removable, dontForceRestart,
  288.         30001, 0, "Update Demo Application for Any Macintosh",
  289.             {    
  290.             'inpk', 200,        //  Delete entire file on removal
  291.             'inpk', 30012,        //  Package 68K update part
  292.             'inpk', 30013,        //  Package PowerPC Macintosh part
  293.             }
  294.         }
  295.     };
  296.  
  297. /* Package to PLACE Demo App for 68K only via res-merge. */
  298. resource 'inpk' (30002) {
  299.     format0 {
  300.         showsOnCustom, notRemovable, dontForceRestart,
  301.         30002, 0, "Place Demo Application for 68K Macintosh",
  302.             {    
  303.             'inpk', 201,    // Install Common Resource fork
  304.             'inpk', 102,    // Install 68K Macintosh CODE Resources (inra)
  305.             }
  306.         }
  307.     };
  308.  
  309. /* Package to UPDATE Demo App for 68K Macintosh only via infa. */
  310. resource 'inpk' (30012) {
  311.     format0 {
  312.         showsOnCustom, notRemovable, dontForceRestart,
  313.         30002, 0, "Update Demo Application for 68K Macintosh",
  314.             {    
  315.             'inpk', 301,    // Install Common Resources
  316.             'inpk', 102,    // Install 68K Macintosh CODE Resources (inra)
  317.             }
  318.         }
  319.     };
  320.  
  321. /* Package of the 68K CODE resources. */
  322. resource 'inpk' (102) {
  323.     format0 {
  324.         doesntShowOnCustom, notRemovable, dontForceRestart,
  325.         0, 0, "Package for 68K Macintosh CODE resources",
  326.             {    
  327.             'inra', 402,    // Install 68K Macintosh CODE resource 0
  328.             'inra', 412,    // Install 68K Macintosh CODE resource 1
  329.             'inra', 422,    // Install 68K Macintosh CODE resource 2
  330.             'inra', 432,    // Install 68K Macintosh CODE resource 3
  331.             'inra', 442,    // Install 68K Macintosh CODE resource 4
  332.             }
  333.         }
  334.     };
  335.  
  336. /* Package of native cfrg resource and the NotPPC alert resources. */
  337. resource 'inpk' (103) {
  338.     format0 {
  339.         doesntShowOnCustom, notRemovable, dontForceRestart,
  340.         0, 0, "Package for 68K Macintosh CODE resources",
  341.             {    
  342.             'inra', 403,    // Install PowerPC Macintosh cfrg resource 0
  343.             'inra', 413,    // Install NotPPC CODE resource 0
  344.             'inra', 423,    // Install NotPPC CODE resource 1
  345.             'inra', 433,    // Install NotPPC ALRT resource 27309
  346.             'inra', 443,    // Install NotPPC DITL resource 27309
  347.             'inra', 453,    // Install NotPPC STR  resource 27309
  348.             }
  349.         }
  350.     };
  351.  
  352. /* Package to PLACE Demo App for PowerPC Macintosh. */
  353. resource 'inpk' (30003) {
  354.     format0 {
  355.         showsOnCustom, notRemovable, dontForceRestart,
  356.         30003, 0, "Place Demo Application for PowerPC Macintosh",
  357.             {    
  358.             'infa', 201,    // Install Common Resources
  359.             'infa', 203,    // Install PowerPC Macintosh Data Fork
  360.             'inrm', 303,    // Install cfrg Resources & NotPPC CODE resources
  361.             }
  362.         }
  363.     };
  364.  
  365. /* Package to UPDATE Demo App for PowerPC Macintosh. */
  366. resource 'inpk' (30013) {
  367.     format0 {
  368.         showsOnCustom, notRemovable, dontForceRestart,
  369.         30003, 0, "Update Demo Application for PowerPC Macintosh",
  370.             {    
  371.             'inpk', 301,    // Install Common Resources
  372.             'inpk', 203,    // Install PowerPC Macintosh Data Fork
  373.             'inpk', 103,    // Install cfrg Resources & NotPPC CODE resources
  374.             }
  375.         }
  376.     };
  377.  
  378.  
  379.  
  380. resource 'icmt' (30001) {
  381.     currentReleaseDate, currentVersion, 30000,
  382.     "This contains the Demo Application, which can be run on any Macintosh."
  383.     };
  384.  
  385. resource 'icmt' (30002) {
  386.     currentReleaseDate, currentVersion, 30000,
  387.     "This contains the Demo Application for use on 68K Macintosh."
  388.     };
  389.  
  390. resource 'icmt' (30003) {
  391.     currentReleaseDate, currentVersion, 30000,
  392.     "This contains the Demo Application for use on PowerPC Macintosh."
  393.     };
  394.  
  395.  
  396. data 'ICON' (30000) {
  397.     $"0001 0000 0002 8000 0004 4000 0008 2000"            /* ......Ä...@... . */
  398.     $"0010 1000 0020 0800 0040 0400 0080 0200"            /* ..... ...@...Ä.. */
  399.     $"0100 0100 0200 0080 0400 0040 0800 0020"            /* .......Ä...@...  */
  400.     $"1000 0010 2000 0008 4000 3F04 8000 4082"            /* .... ...@.?.Ä.@Ç */
  401.     $"4000 8041 2001 3022 1001 C814 080E 7F8F"            /* @.ÄA .0"..»....è */
  402.     $"0402 3007 0201 0007 0100 8007 0080 6007"            /* ..0.......Ä..Ä`. */
  403.     $"0040 1FE7 0020 021F 0010 0407 0008 0800"            /* .@... .......... */
  404.     $"0004 1000 0002 2000 0001 4000 0000 8000"            /* ...... ...@...Ä. */
  405.     };
  406.  
  407.  
  408.  
  409.  
  410. /************************** Atoms resources **********************************/
  411.  
  412. /* ResMerge Atom to install common resources. */
  413. resource 'inrm' (301) {
  414.     format0 {
  415.         0,                /* Total size of resources. */
  416.         10000,            /* Target File Spec. */
  417.         20001,            /* Source File Spec. Demo App Parts:Common Part*/
  418.         ""
  419.     }
  420. };
  421.  
  422. /* ResMerge Atom to install 68K code resources. Not really needed......*/
  423. resource 'inrm' (302) {
  424.     format0 {
  425.         0,                /* Total size of resources. */
  426.         10000,            /* Target File Spec. */
  427.         20002,            /* Source File Spec. Demo App Parts:68K Part */
  428.         ""
  429.     }
  430. };
  431.  
  432. /* ResMerge Atom to install common resources. */
  433. resource 'inrm' (303) {
  434.     format0 {
  435.         0,                /* Total size of resources. */
  436.         10000,            /* Target File Spec. */
  437.         20003,            /* Source File Spec. Demo App Parts:PowerPC Macintosh Part*/
  438.         ""
  439.     }
  440. };
  441.  
  442.  
  443. /* This File Atom deletes the entire file on removes. */
  444. resource 'infa' (200) {
  445.     format1 {
  446.         deleteWhenRemoving,
  447.         dontDeleteWhenInstalling,
  448.         dontCopy,
  449.         dontIgnoreLockedFile,
  450.         dontSetFileLocked,
  451.         useSrcCrDateToCompare,
  452.         srcNeedExist,
  453.         rsrcForkInRsrcFork,
  454.         leaveAloneIfNewer,
  455.         updateExisting,
  456.         copyIfNewOrUpdate,
  457.         rsrcFork,
  458.         dataFork,
  459.         0,
  460.         0,
  461.         10000,
  462.         {    0, 0, 0    },
  463.         0x0,
  464.         0,
  465.         0,
  466.         ""
  467.     }
  468. };
  469.  
  470. /* This File Atom copies the common resources in the resource fork. */
  471. resource 'infa' (201) {
  472.     format1 {
  473.         deleteWhenRemoving,
  474.         dontDeleteWhenInstalling,
  475.         copy,
  476.         dontIgnoreLockedFile,
  477.         dontSetFileLocked,
  478.         useVersProcToCompare,
  479.         srcNeedExist,
  480.         rsrcForkInRsrcFork,
  481.         leaveAloneIfNewer,
  482.         updateExisting,
  483.         copyIfNewOrUpdate,
  484.         rsrcFork,
  485.         noDataFork,
  486.         0,
  487.         0x2000+0x0040,
  488.         10000,
  489.         {    20001, 0, 0    },
  490.         0x0,
  491.         0,
  492.         0,
  493.         ""
  494.     }
  495. };
  496.  
  497. /* This File Atom copies the 68K code contained in the rsrc fork. (for new copy)*/
  498. /*    resource 'infa' (202) {
  499.         format1 {
  500.             dontDeleteWhenRemoving,
  501.             dontDeleteWhenInstalling,
  502.             copy,
  503.             dontIgnoreLockedFile,
  504.             dontSetFileLocked,
  505.             useVersProcToCompare,
  506.             srcNeedExist,
  507.             rsrcForkInRsrcFork,
  508.             leaveAloneIfNewer,
  509.             keepExisting,
  510.             copyIfNewOrUpdate,
  511.             rsrcFork,
  512.             noDataFork,
  513.             0,
  514.             0x2000+0x0040,
  515.             10000,
  516.             {    20002, 0, 0    },
  517.             0x0,
  518.             0,
  519.             0,
  520.             ""
  521.         }
  522.     };
  523. */
  524.  
  525. /* This File Atom copies the RISC code contained in the data fork. */
  526. resource 'infa' (203) {
  527.     format1 {
  528.         dontDeleteWhenRemoving,
  529.         dontDeleteWhenInstalling,
  530.         copy,
  531.         dontIgnoreLockedFile,
  532.         dontSetFileLocked,
  533.         useVersProcToCompare,
  534.         srcNeedExist,
  535.         rsrcForkInRsrcFork,
  536.         leaveAloneIfNewer,
  537.         updateExisting,
  538.         copyIfNewOrUpdate,
  539.         noRsrcFork,
  540.         dataFork,
  541.         0,
  542.         0x2000+0x0040,
  543.         10000,
  544.         {    20003, 0, 0    },
  545.         0x0,
  546.         0,
  547.         0,
  548.         ""
  549.     }
  550. };
  551.  
  552.  
  553.  
  554. resource 'inra' (402) {
  555.     format1 {
  556.         dontDeleteWhenRemoving,
  557.         dontDeleteWhenInstalling,
  558.         copy,
  559.         updateEvenIfNewer,
  560.         noTgtRequired,
  561.         updateExisting,
  562.         copyIfNewOrUpdate,
  563.         ignoreProtection,
  564.         srcNeedExist,
  565.         byID,
  566.         nameNeedNotMatch,
  567.         0,
  568.         10000,
  569.         'CODE',
  570.         0,
  571.         0x0,
  572.         "",
  573.         {    20002, 'CODE', 0, 0, ""    },
  574.         0x0,
  575.         0,
  576.         0,
  577.         ""
  578.         }
  579.     };
  580.  
  581. resource 'inra' (412) {
  582.     format1 {
  583.         dontDeleteWhenRemoving,
  584.         dontDeleteWhenInstalling,
  585.         copy,
  586.         updateEvenIfNewer,
  587.         noTgtRequired,
  588.         updateExisting,
  589.         copyIfNewOrUpdate,
  590.         ignoreProtection,
  591.         srcNeedExist,
  592.         byID,
  593.         nameNeedNotMatch,
  594.         0,
  595.         10000,
  596.         'CODE',
  597.         1,
  598.         0x0,
  599.         "",
  600.         {    20002, 'CODE', 1, 0, ""    },
  601.         0x0,
  602.         0,
  603.         0,
  604.         ""
  605.         }
  606.     };
  607.  
  608. resource 'inra' (422) {
  609.     format1 {
  610.         dontDeleteWhenRemoving,
  611.         dontDeleteWhenInstalling,
  612.         copy,
  613.         updateEvenIfNewer,
  614.         noTgtRequired,
  615.         updateExisting,
  616.         copyIfNewOrUpdate,
  617.         ignoreProtection,
  618.         srcNeedExist,
  619.         byID,
  620.         nameNeedNotMatch,
  621.         0,
  622.         10000,
  623.         'CODE',
  624.         2,
  625.         0x0,
  626.         "",
  627.         {    20002, 'CODE', 2, 0, ""    },
  628.         0x0,
  629.         0,
  630.         0,
  631.         ""
  632.         }
  633.     };
  634.  
  635. resource 'inra' (432) {
  636.     format1 {
  637.         dontDeleteWhenRemoving,
  638.         dontDeleteWhenInstalling,
  639.         copy,
  640.         updateEvenIfNewer,
  641.         noTgtRequired,
  642.         updateExisting,
  643.         copyIfNewOrUpdate,
  644.         ignoreProtection,
  645.         srcNeedExist,
  646.         byID,
  647.         nameNeedNotMatch,
  648.         0,
  649.         10000,
  650.         'CODE',
  651.         3,
  652.         0x0,
  653.         "",
  654.         {    20002, 'CODE', 3, 0, ""    },
  655.         0x0,
  656.         0,
  657.         0,
  658.         ""
  659.         }
  660.     };
  661.  
  662. resource 'inra' (442) {
  663.     format1 {
  664.         dontDeleteWhenRemoving,
  665.         dontDeleteWhenInstalling,
  666.         copy,
  667.         updateEvenIfNewer,
  668.         noTgtRequired,
  669.         updateExisting,
  670.         copyIfNewOrUpdate,
  671.         ignoreProtection,
  672.         srcNeedExist,
  673.         byID,
  674.         nameNeedNotMatch,
  675.         0,
  676.         10000,
  677.         'CODE',
  678.         4,
  679.         0x0,
  680.         "",
  681.         {    20002, 'CODE', 4, 0, ""    },
  682.         0x0,
  683.         0,
  684.         0,
  685.         ""
  686.         }
  687.     };
  688.  
  689.  
  690. resource 'inra' (403) {
  691.     format1 {
  692.         dontDeleteWhenRemoving,
  693.         dontDeleteWhenInstalling,
  694.         copy,
  695.         leaveAloneIfNewer,
  696.         noTgtRequired,
  697.         updateExisting,
  698.         copyIfNewOrUpdate,
  699.         ignoreProtection,
  700.         srcNeedExist,
  701.         byID,
  702.         nameNeedNotMatch,
  703.         0,
  704.         10000,
  705.         'cfrg',
  706.         0,
  707.         0x0,
  708.         "",
  709.         {    20003, 'cfrg', 0, 0, ""    },
  710.         0x0,
  711.         0,
  712.         0,
  713.         ""
  714.         }
  715.     };
  716.  
  717. resource 'inra' (413) {
  718.     format1 {
  719.         dontDeleteWhenRemoving,
  720.         dontDeleteWhenInstalling,
  721.         copy,
  722.         leaveAloneIfNewer,
  723.         noTgtRequired,
  724.         keepExisting,
  725.         copyIfNewOrUpdate,
  726.         ignoreProtection,
  727.         srcNeedExist,
  728.         byID,
  729.         nameNeedNotMatch,
  730.         0,
  731.         10000,
  732.         'CODE',
  733.         0,
  734.         0x0,
  735.         "",
  736.         {    20003, 'CODE', 0, 0, ""    },
  737.         0x0,
  738.         0,
  739.         0,
  740.         ""
  741.         }
  742.     };
  743.  
  744. resource 'inra' (423) {
  745.     format1 {
  746.         dontDeleteWhenRemoving,
  747.         dontDeleteWhenInstalling,
  748.         copy,
  749.         leaveAloneIfNewer,
  750.         noTgtRequired,
  751.         keepExisting,
  752.         copyIfNewOrUpdate,
  753.         ignoreProtection,
  754.         srcNeedExist,
  755.         byID,
  756.         nameNeedNotMatch,
  757.         0,
  758.         10000,
  759.         'CODE',
  760.         1,
  761.         0x0,
  762.         "",
  763.         {    20003, 'CODE', 1, 0, ""    },
  764.         0x0,
  765.         0,
  766.         0,
  767.         ""
  768.         }
  769.     };
  770.  
  771. resource 'inra' (433) {
  772.     format1 {
  773.         dontDeleteWhenRemoving,
  774.         dontDeleteWhenInstalling,
  775.         copy,
  776.         leaveAloneIfNewer,
  777.         noTgtRequired,
  778.         keepExisting,
  779.         copyIfNewOrUpdate,
  780.         ignoreProtection,
  781.         srcNeedExist,
  782.         byID,
  783.         nameNeedNotMatch,
  784.         0,
  785.         10000,
  786.         'ALRT',
  787.         27309,
  788.         0x0,
  789.         "",
  790.         {    20003, 'ALRT', 27309, 0, ""    },
  791.         0x0,
  792.         0,
  793.         0,
  794.         ""
  795.         }
  796.     };
  797.  
  798. resource 'inra' (443) {
  799.     format1 {
  800.         dontDeleteWhenRemoving,
  801.         dontDeleteWhenInstalling,
  802.         copy,
  803.         leaveAloneIfNewer,
  804.         noTgtRequired,
  805.         keepExisting,
  806.         copyIfNewOrUpdate,
  807.         ignoreProtection,
  808.         srcNeedExist,
  809.         byID,
  810.         nameNeedNotMatch,
  811.         0,
  812.         10000,
  813.         'DITL',
  814.         27309,
  815.         0x0,
  816.         "",
  817.         {    20003, 'DITL', 27309, 0, ""    },
  818.         0x0,
  819.         0,
  820.         0,
  821.         ""
  822.         }
  823.     };
  824.  
  825. resource 'inra' (453) {
  826.     format1 {
  827.         dontDeleteWhenRemoving,
  828.         dontDeleteWhenInstalling,
  829.         copy,
  830.         leaveAloneIfNewer,
  831.         noTgtRequired,
  832.         keepExisting,
  833.         copyIfNewOrUpdate,
  834.         ignoreProtection,
  835.         srcNeedExist,
  836.         byID,
  837.         nameNeedNotMatch,
  838.         0,
  839.         10000,
  840.         'STR ',
  841.         27309,
  842.         0x0,
  843.         "",
  844.         {    20003, 'STR ', 27309, 0, ""    },
  845.         0x0,
  846.         0,
  847.         0,
  848.         ""
  849.         }
  850.     };
  851.  
  852.  
  853.  
  854. /************************** Target File Spec. resources **********************************/
  855. resource 'intf' (10000) {
  856.     format0 {
  857.         noSearchForFile, TypeCrNeedNotMatch, 'APPL', 'WATR', 0,
  858.         "folder-user:WaterTank Demo App"
  859.         }
  860.     };
  861.  
  862.  
  863. /************************** Source File Spec. resources **********************************/
  864. resource 'infs' (20001) {
  865.     'rsrc', 'RSED', 0x1, noSearchForFile, TypeCrMustMatch,
  866.     "WaterTank Parts:Common Part"
  867.     };
  868.  
  869. resource 'infs' (20002) {
  870.     'rsrc', 'RSED', 0x1, noSearchForFile, TypeCrMustMatch,
  871.     "WaterTank Parts:68K Macintosh Part"
  872.     };
  873.  
  874. resource 'infs' (20003) {
  875.     'rsrc', 'RSED', 0x1, noSearchForFile, TypeCrMustMatch,
  876.     "WaterTank Parts:PowerPC Macintosh Part"
  877.     };
  878.  
  879.  
  880. // The preferenece resource allows that script writer to specify certain attributes of the Installer's
  881. // interface and actions.  This resource is the default if the script writer does not provide one.
  882. resource 'inpr' (300) {
  883.     format0 {
  884.         useFolderTargetMode,
  885.         allowUserToSetSystemDisk,
  886.         showSelectedSizeInCustom,
  887.         noSetupFunctionSupplied,
  888.         dontAllowCleanInstall,
  889.         dontAllowServerAsTarget,
  890.         0,
  891.         0,
  892.             {    
  893.             301, 311, 301, 311,
  894.             302, 312, 302, 312
  895.             },
  896.         "Demo Application Folder"
  897.         }
  898.     };
  899.  
  900.  
  901.  
  902.